package no21.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExceptionThread implements Runnable{
	
	public ExceptionThread(){
		
	}
	
	@Override
	public void run() {
		throw new RuntimeException();		
	}
	
	public static void main(String[] args) {
		//try {
		//	new Thread(new ExceptionThread()).start();
		//} catch (RuntimeException e) {
		//	System.out.println("ere");
		//}
		
		try {
			ExecutorService exec = Executors.newCachedThreadPool();
			exec.execute(new ExceptionThread());
		} catch (RuntimeException e) {
			System.out.println("ere");
		}
	}

}
